import request from '@/utils/request'

export function createComment(data) {
  return request({
    url: '/comments',
    method: 'post',
    data
  })
}

export function getComment(query) {
  return request({
    url: '/comments',
    method: 'get',
    params: query
  })
}

export function delComment(id) {
  console.log(id)
  return request({
    url: `/comments/${id}/remove`,
    method: 'delete'
  })
}

export function getGoodComment(id,query) {
  return request({
    url: `/comments/${id}`,
    method: 'get',
    params: query
  })
}